const state={
  timer:null,
  timer2:null,
  electricityTimer:null,
  energyTimer:null,
  lightRateTimer:null,
  workTimer:null,
}
const getters={
  timer:state=>state.timer,
  timer2:state=>state.timer2,
  electricityTimer:state=>state.electricityTimer,
  energyTimer:state=>state.energyTimer,
  lightRateTimer:state=>state.lightRateTimer,
  workTimer:state=>state.workTimer,
}
const mutations={
  setTimer(state,v){
    state.timer=v
  },
  clearTimer(state){
    clearInterval(state.timer)
    state.timer=null
  },
  setTimer2(state,v){
    state.timer2=v
  },
  clearTimer2(state){
    clearInterval(state.timer2)
    state.timer2=null
  },
  setElectricityTimer(state,v){
    state.electricityTimer=v
  },
  clearElectricityTimer(state){
    clearInterval(state.electricityTimer)
    state.electricityTimer=null
  },
  setEnergyTimer(state,v){
    state.energyTimer=v
  },
  clearEnergyTimer(state){
    clearInterval(state.energyTimer)
    state.energyTimer=null
  },
  setLightRateTimer(state,v){
    state.lightRateTimer=v
  },
  clearLightRateTimer(state){
    clearInterval(state.lightRateTimer)
    state.lightRateTimer=null
  },
  setWorkTimer(state,v){
    state.workTimer=v
  },
  clearWorkTimer(state){
    clearInterval(state.workTimer)
    state.workTimer=null
  },
}
export default {
  namespaced:true,
  state,
  getters,
  mutations
}
